﻿#region Using namespaces

using System;
using System.Windows.Controls;
using System.Windows.Input;

#endregion

namespace BOL.Apps.GeneNetworkBrowser.ViewModels
{
    public class CommandViewModel : ViewModelBase
    {
        #region Private variables

        private ICommand _command;

        #endregion

        #region Public property

        public ICommand Command
        { 
            get
            { 
                return _command; 
            } 
            set 
            {
                if (value != _command)
                {
                    _command = value;
                    OnPropertyChanged("Command");
                }
            }
        }

        #endregion

        #region Constructor

        public CommandViewModel(string title, ICommand command)
        {
            if (command == null)
                throw new ArgumentNullException("Command cannot be null.");

            _title = title;
            _command = command;
        }

        #endregion
    }
}
